package com.example.school.controller.user;

import com.example.school.dto.UserAddMoneyDto;
import com.example.school.service.MealService;
import com.example.school.utils.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/meal")
public class MealController {

    @Autowired
    private MealService mealService;

    @GetMapping("get_meal_money")
    public Result getMealMoney(){
        return mealService.getMealMoney();
    }

    @PostMapping("add_meal_money")
    public Result addMealMoney(@RequestBody UserAddMoneyDto dto){
        return mealService.addMealMoney(dto);
    }

}
